#ifndef _GAMEENGINE_INCLUDE_
#define _GAMEENGINE_INCLUDE_

class CEngineFrameListener;

class CGameEngine
{
public:
	static CGameEngine* getSingletonPtr();

	CGameEngine();
	~CGameEngine();

	Ogre::Camera* getCamera() { return mCamera; }
	Ogre::SceneManager* getSceneManager() { return mSceneMgr; }
	Ogre::RenderWindow* getRenderWindow() { return mWindow; }

	bool initEngine(const char* gamename);
	void initResource();
	void finiEngine();

	void addResourceLocation(const char* path, const char* rtype, const char* group=NULL, bool download=false);

protected:
	void initPath(const char* gamename);
	void installPlugins();

protected:
	Ogre::Root* mRoot;
	CEngineFrameListener* mFrameListener;
	Ogre::Plugin* mRenderPlugin;
	Ogre::Plugin* mParticleFXPlugin;
	Ogre::SceneManager* mSceneMgr;
	Ogre::Camera* mCamera;
	Ogre::RenderWindow* mWindow;

	Ogre::String mContentDir;
	Ogre::String mDownloadContentDir;
	Ogre::String mLogDir;
	Ogre::String mShaderCachePath;
	Ogre::String mShaderPath;
};

#endif // _GAMEENGINE_INCLUDE_
